package com.neu.icloud.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.neu.icloud.entity.WorkOrder;

@Mapper
public interface WorkOrderMapper {

	//查询工单
	@Select("select * from workorder")
	public List<WorkOrder> selectAllWork();
	
	//新增工单
	public int saveWorkOrder(WorkOrder workOrder);
	
	//根据计划id查询工单状态
	@Select("select state from workorder where planId=#{planId}")
	public List<String> selectByPlanId(Integer planId);
	//修改工单
	public int updateWorkOrder(WorkOrder workOrder);
	
	//删除工单
	@Delete("delete from workorder where workOrderId=#{workOrderId}")
	public int deleteWorkOrder(String workOrderId);
}
